package com.aizuda.boot.modules.business.feishu.strategy.impl;

import com.aizuda.boot.modules.auth.domain.entity.ThirdUser;
import com.aizuda.boot.modules.business.feishu.domain.AtUsersDTO;
import com.aizuda.boot.modules.system.entity.SysMessage;
import com.aizuda.boot.modules.business.feishu.domain.BotValues;
import com.aizuda.boot.modules.business.feishu.strategy.TemplateParameterStrategy;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;

/**
 * 抽象的模版参数构建策略基类
 *
 * @author system
 * @date 2025-01-22
 */
public abstract class AbstractTemplateParameterStrategy implements TemplateParameterStrategy {

    /**
     * 获取当前时间字符串
     */
    protected String getCurrentTime() {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
    }

    /**
     * 根据业务类型获取消息类型描述
     */
    protected String getMessageTypeDescription(String businessType) {
        if (null == businessType) {
            return "文本";
        }
        return switch (businessType) {
            case "flowTodoTask" -> "流程待处理提醒";
            case "filling" -> "归档提醒";
            case "performance" -> "合同到期提醒";
            case "at" -> "@提醒";
            case "remind" -> "催办提醒";
            default -> "提醒";
        };
    }

} 